package com.roc.util.constant;

public enum RiskRuleAboutAll {
	//风控对象
	CARD("Card","单银行卡"),
	MCHT("Mcht","单商户"),
	//风控周期
	DAY("Day","单日"),
	MONTH("Month","单月"),
	NORMAL("Normal","通用"),
	//特殊类型
	CT("CT","磁条卡"),
	IC("IC","芯片卡"),
	MIN("Min","最小"),
	DEBIT("Debit","贷记卡"),
	CREDIT("Credit","借记卡"),
	CREDITCT("Credit_CT","借记卡磁条卡"),
	NFC("NFC","云闪付"),
	MAX("Max","最大"),
	//计算方法
	SINGLE("Single","单笔"),
	TOTAL("Total","累计"),
	//计算单位
	MONEY("Money","金额"),
	COUNT("Count","次数"),
	//状态标示
	OPEN("1","开启"),
	SHUTDOWN("2","交易关闭"),
	NOTAUTH_CT("NotAuth_CT","未认证磁条卡");
	private String code;
	private String desc;
	
	private RiskRuleAboutAll(String code,String desc){
		this.code = code;
		this.desc = desc;
	}
	
	public String getCode() {
		return code;
	}
	public String getDesc() {
		return desc;
	}
	
	public static RiskRuleAboutAll valueOfCode(String code){
		for (RiskRuleAboutAll ms : values()) {
			if (ms.getCode().equals(code)) {
				return ms;
			}
		}
		throw new IllegalArgumentException("MerchantStatus code " + code
				+ " is not exist");
	}
}
